import fetch from 'common/src/utils/fetch';

/**
 *获取列表
 */
function getListPage(data) {
  return fetch({
    url: '/api/electionservice/undergraduateExamNumberTime/getListPage',
    method: 'post',
    data
  })
}

/**
 *复制上学期
 */
function importPreTerm(data,examType) {
  return fetch({
    url: '/api/electionservice/undergraduateExamNumberTime/importPreTerm'+"?calendarId="+data+"&examType="+examType,
    method: 'get'
  })
}

/**
 *新增
 */
function addRatingSetting(data) {
  return fetch({
    url: '/api/electionservice/undergraduateExamNumberTime/add',
    method: 'post',
    data
  })
}

/**
 *修改
 */
function editRatingSetting(data) {
  return fetch({
    url: '/api/electionservice/undergraduateExamNumberTime/edit',
    method: 'post',
    data
  })
}

/**
 *删除
 */
function deleteRatingSetting(data) {
  return fetch({
    url: '/api/electionservice/undergraduateExamNumberTime/delete',
    method: 'delete',
    data
  })
}

/**
 *清空实际排考
 */
function emptyQueuedExamNumber(data) {
  return fetch({
    url: '/api/electionservice/undergraduateExamNumberTime/emptyQueuedExamNumber',
    method: 'delete',
    data
  })
}


export default {
  getListPage: getListPage,
  addRatingSetting:addRatingSetting,
  editRatingSetting:editRatingSetting,
  deleteRatingSetting:deleteRatingSetting,
  emptyQueuedExamNumber:emptyQueuedExamNumber,
  importPreTerm:importPreTerm
};
